#!/bin/bash

set -e

chmod +x /usr/bin/mount_curve_clouddisk.sh
cp /usr/bin/mount_curve_clouddisk.sh /etc/init.d
update-rc.d mount_curve_clouddisk.sh defaults

filename=$HOSTNAME"_curvefile"
sed -i "s/filename=curvefile/filename=$filename/g" /etc/nbd/k8s_curve.conf

exit 0